user_info={
    "userinfo":{
        "TQ_username": "cc9200",
         "TQ_password": "cc9200"
        },
    'IDtoExchange':{
         #上海
        "rb":'SHFE',"zn":'SHFE',"ag":'SHFE',"bu":'SHFE',"sp":'SHFE',
        "ss":'SHFE',"fu":'SHFE','ru':'SHFE', 'cu':'SHFE', 
        'al':'SHFE', 'ni':'SHFE', 'ag':'SHFE', 'hc':'SHFE', 
         'ao':'SHFE', 
        #大连
        "i":'DCE',"m":'DCE',"p":'DCE',"eg":'DCE',"l":'DCE',"v":'DCE',
        "pg":'DCE',"c":'DCE',"a":'DCE',"b":'DCE',"cs":'DCE',"eb":'DCE',
        "j":'DCE',"jm":'DCE',"pp":'DCE',"y":'DCE',"jd":'DCE',
        #郑州
        "SR":'CZCE',"TA":'CZCE',"SA":'CZCE',"FG":'CZCE','CF':'CZCE',
        "MA":'CZCE','AP':'CZCE','JD':'CZCE','CJ':'CZCE','OI':'CZCE',
        'PF':'CZCE','PX':'CZCE','RM':'CZCE','SF':'CZCE','SR':'CZCE',
        'UR':'CZCE','ZC':'CZCE','SM':'CZCE','SH':'CZCE',
        #能源
        "lu":'INE',"nr":'INE',"sc":'INE',"ec":'INE',
        #广期所
        'si':'GFEX',"lc":'GFEX',
        },
    "IDtoMiniprice":{
                       "rb":1,"zn":5,"ag":1,"bu":1,"sp":2,"ss":10,"fu":1,'ru':5,  #上海
                        "i":0.5,"m":1,"p":2,"eg":1,"l":1,"v":1,"pg":1,"c":1,#大连
                        "SR":1,"TA":2,"SA":2,"FG":1,'CF':5,"MA":1,#郑州
                     
                    }
}

def getCode(InstrumentID):
    return InstrumentID[:2] if InstrumentID[1].isalpha() else InstrumentID[0]

def logicalOprator(num1,logicStr,num2):
    if logicStr ==">":
        return num1>num2
    elif logicStr =="<":
        return num1<num2
    elif logicStr ==">=":
        return num1>=num2
    elif logicStr =="<=":
        return num1<=num2
    else:
        raise ValueError('逻辑运算符错误')